package com.hj.springframework2.aop;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @Author : hujing
 * @Date: 2025/6/24 15:02
 * @Description:
 */
public abstract class BeforeInvocationHandlerAdapter implements InvocationHandler {
    
    public abstract void before(Object proxy,Method method,Object[] args);
    
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        before(proxy,method,args);// 增强逻辑
        return method.invoke(proxy,args);
    }
}
